<%@ Import Namespace="Security"%>
<%@ Import Namespace="System.Web.Services.Protocols" %>

<script runat=server>
  Public Sub Page_Load()
    span1.InnerHtml = ""
    span2.InnerHtml = ""
  End Sub

  Public Sub Authenticate_Click(sender As Object, e As EventArgs)
    Dim s As New SecureWebService()

    ' Create the Authentication header and set values
    Dim a As New Authentication()
    a.User = user.Value
    a.Password = password.Value

    ' Assign the Header
    s.AuthenticationValue = a

    ' Call method
    Try
      span1.InnerHtml = s.ValidUser()
    Catch soap As SoapException
      span2.InnerHtml = soap.Message
    End Try
  End Sub
</script>

<form runat=server>
        <font size=6>
	Username: <input type=text id=user runat=server/>
	<BR>
	Password: <input type=text id=password runat=server/>
	<P>
	<input type=submit runat=server OnServerClick="Authenticate_Click" value="Login"/>
        </font>
</form>
<hr size=1>
<font size=6>result: <font color=red><span id=span1 runat=server/></font></font>
<P>
<font size=6>error: <font color=red><span id=span2 runat=server/></font></font>
